If the ``-.'' flag is specified, the modified article is sent to the standard output, rather than feed into inews.
By default, mail2news sends its input to ``inews -h''; this can be changed by using the ``-='' flag, which will send the output to the specified program. Note that no argument parsing is done, so that only a single word may be specified with the ``-='' flag.
The ``-o,'' ``-n,'' ``-d,'' or ``-a'' flags may be used to specify the Organization, Newsgroups, Distribution, or Approved header in the message. Note that unlike the inews parallels of these flags, the ``-n'' flag overrides any Newsgroups header that might appear in the message, while the other flags specify defaults if the message does not have the headers. In addition, as a concession to sendmail(8) alias processing the argument to the ``-o'' flag is handled specially. Since many sendmail.cf files do not have the ``preserve case'' flag on for the ``prog'' mailer, a period in the argument means that the following character should be converted to uppercase; two periods mean to output a single period. For example, if the following line is in /usr/lib/aliases(5):
If the ``-F'' flag is given, then mail2news will try to filter out the ``please add me to your mailing list'' messages often sent by network neophytes. This is done by looking for short messages which have words like subscribe in them.
Mail2news can modify the newsgroups an article is sent to, based on regular expressions found in the ``Title:'', ``Keywords:'', and ``Summary:'' headers. The headers are scanned once for each newsgroup the article is originally destined for, provided a mapping file exists for the newsgroup. (The path to the mapping file depends on a compile-time parameter.) For example, if a mail message is to be sent to talk.foo and soc.bar, mail2news will scan the headers twice. If the file /usr/lib/news/.admin/talk.foo (or /usr/spool/news/talk/foo/recnews.cmd) exists, the commands in that file are interpreted. The scan is repeated, with the appropriate file for soc.bar. In the explanation below, the ``current newsgroup'' will be first talk.foo and then soc.bar.
Blank lines, and lines beginning with a pound sign (#) are ignored. Other lines should like like this:
The valid commands are:
a Add All newsgroups in the arg are added d Delete The current group is deleted from the article k Kill The article is returned, and arg is given as a contact name m Move The current group is deleted and the arg group is added q Quiet kill The article is quietly ignored
For example, here is a fragment from the mapping file for a local.bboard newsgroup:
# Move seminars and talks /seminar/m local.seminars,region.seminars /lecture/m local.seminars,region.seminars # Move housing requests /housing/m local.housing /apartment/m local.housing # Kill flames /flame/k the anti-flame society /jerk/q @placeholder # Copy machine downtime announcements /downtime/a local.config,news.config # If you want something, it's not forsale /want/a local.wanted /want/d @placeholder